package com.banshuibao.bsb_android.activity;

import android.graphics.Color;
import android.os.Bundle;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan;
import android.widget.TextView;

import com.banshuibao.bsb_android.R;

public class UserAgreementActivity extends BaseActivity {

    private TextView textView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_agreement);
        setTitleText("用户协议");
        textView = (TextView) findViewById(R.id.tv);
        SpannableStringBuilder builder = new SpannableStringBuilder(textView.getText().toString());
        ForegroundColorSpan yellowSpan = new ForegroundColorSpan(Color.YELLOW);
        ForegroundColorSpan yellowSpan1 = new ForegroundColorSpan(Color.YELLOW);
        builder.setSpan(yellowSpan, 245,247, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        builder.setSpan(yellowSpan1, 3661,3804, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
        textView.setText(builder);
    }
}
